from movies.models import *
from django.contrib import admin

class PlotInline(admin.TabularInline):
	model = Plot
	extra = 1

class MovieAdmin(admin.ModelAdmin):
	fieldsets = [
		(None,		{'fields': ['title', 'imdb_id']}),
		('Titles',	{'fields': ['title_long', 'title_cano', 'title_long_cano'], 'classes': ['collapse']}),
		('Stuff',	{'fields': ['year', 'genre', 'runtime', 'cover_url'], 'classes': ['collapse']}),
		('Rates',	{'fields': ['imdb_rating', 'mpaa_warning', 'mpaa_rating'], 'classes': ['collapse']}),
	]
	inlines = [PlotInline]
	list_display = ('title',)

admin.site.register(Movie, MovieAdmin)
admin.site.register(Genre)
admin.site.register(Certificate)
